import QtQuick 1.1
import com.nokia.meego 1.0

Dialog {
    id: messageBox

    function setCaptionLabel(text) {
        captionLabel.text = text;
    }

    function setTextLabel(text) {
        textLabel.text = text;
    }

    function setYesButtonVisible(visible) {
        yesButton.visible = visible;
    }

    function setCancelButtonVisible(visible) {
        cancelButton.visible = visible;
    }

    title: Label {
        id: captionLabel
        width: parent.width
        anchors.horizontalCenter: parent.horizontalCenter
        //text: "<center>Delete<center>"
        color: "#ff6666"
        font.weight: Font.Bold
    }
    content: Column {
        width: parent.width
        spacing: 10
        Label {
            id: textLabel
            width: parent.width
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.margins: 10
            color: "#ffffff"
            //text: "<center>Really delete the host?<center>"
            wrapMode: Text.WordWrap
        }
    }
    buttons: ButtonRow {
        style: ButtonStyle { }
        anchors.horizontalCenter: parent.horizontalCenter
        Button {
            id: yesButton
            text: "Yes";
            onClicked: {
                //pageStack.pop();
                messageBox.accept();
            }
        }
        Button {
            id: cancelButton
            text: "Cancel";
            onClicked: {
                messageBox.reject();
            }
        }
    }
}
